chore: lib upgrades for trivy issues#1705
Conversation
Greptile SummaryThis PR addresses Trivy-reported vulnerabilities by upgrading the bundled Prometheus binary from 2.53.4 to 3.5.3 (LTS) and removing npm/npx from the runtime Docker image.
Confidence Score: 5/5Safe to merge — the Prometheus v3 flags and scrape config used by the codebase are unchanged, SHA256 hashes are verified, and the npm removal does not affect the runtime entrypoint. The diff touches only two well-scoped concerns: a version bump with verified checksums and a surface-reduction in the Docker image. All CLI flags passed to Prometheus are confirmed valid in v3, the scrape config format is unchanged, and the runtime entrypoint (cmd.sh) never calls npm or npx. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "lib upgrades for trivy issues" | Re-trigger Greptile |
| desc: Download and extract prometheus binary | ||
| vars: | ||
| VERSION: '2.53.4' | ||
| VERSION: '3.5.3' |
There was a problem hiding this comment.
This is a major version change. Will it be able to read the v2 data? If so, we need a migration step.
There was a problem hiding this comment.
Ah yeah, it does require at least thinking through the implications of https://prometheus.io/docs/prometheus/latest/migration/
| # safely grab the ip-to-country database. | ||
| RUN apk upgrade --no-cache && apk add --no-cache --upgrade coreutils curl | ||
| # Remove npm/npx CLI — the runtime only invokes `node`, and npm ships old transitive deps that | ||
| # trip image vulnerability scanners. |
There was a problem hiding this comment.
BTW, we don't have to over-index in vulnerability scanners if they are not exploitable. There's a ton of false-positives. I would imagine that a new node image would address that. Why don't you upgrade the node image instead?
|
Yeah, I split this out because it came up while I was working on #1704 but I agree that there's no pressing need to do these upgrades. Particularly if they require deeper migration planning we can drop this one for now. |
Further upgrades for lib version security issues surfaced by Trivy